package com.molichuxing.services.infrastructure.service.impl;

import com.molichuxing.services.infrastructure.bean.VehicleControlLogsBean;
import com.molichuxing.services.infrastructure.dao.CarsControlLogsMapper;
import com.molichuxing.services.infrastructure.dto.request.create.CarsControlLogsBeanDto;
import com.molichuxing.services.infrastructure.service.CarsControlLogsService;
import org.springframework.beans.BeanUtils;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;

/**
 * 控车日志
 * @author whl
 */
@Service
public class CarsControlLogsServiceImpl implements CarsControlLogsService {
    @Resource
    private CarsControlLogsMapper carsControlLogsMapper;


    @Override
    public void saveVehicleControlLogs(CarsControlLogsBeanDto dto) {
        VehicleControlLogsBean vehicleControlLogsBean=new VehicleControlLogsBean();
        BeanUtils.copyProperties(dto, vehicleControlLogsBean);
        try {
            carsControlLogsMapper.insert(vehicleControlLogsBean);
        }catch (Exception e){
            System.out.println(e.getMessage());
        }

    }
}
